package com.cy.controller;

import com.cy.common.entity.Result;
import com.cy.entity.vo.UserVo;
import com.cy.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @Author : 残影
 * @Date: 2021-02-22 10:47
 */
@RestController
@RequestMapping("/applet/login")
@Api(tags = "小程序登录模块")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @ApiOperation("微信授权登录")
    @PostMapping("{code}")
    public Result appletLogin(@PathVariable String code, @RequestBody UserVo userVo){
        return loginService.getAppletLogin(code,userVo);

    }
}
